<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<title>{:config('web_site_title')}--专业的小说分销平台</title>
	<link href="__PUBLIC__/css/bootstrap/bootstrap.min.css" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/libs/font-awesome.css" />
	<link rel="stylesheet" type="text/css" href="__CSS__/style.css" />
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/common.css" />
	<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
	<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
	<!--[if lt IE 9]>
<script src="__PUBLIC__/js/html5shiv.min.js"></script>
<script src="__PUBLIC__/js/ie8polyfill.min.js"></script>
<![endif]-->
</head>
<body id="login-page-full">
	<div id="login-full-head">
	</div>
	<div id="login-full-wrapper">
		<div class="container">
			<div class="row">
				<div class="col-xs-12">
					<div id="login-box">
						<div id="login-box-holder">
							<div class="row">
								<div class="col-xs-12">
									<header id="login-header">
										<div class="head"><i class="fa fa-user"></i> 请您登录</div>
									</header>
									<div id="login-box-inner">
										<form role="form" method="post">
											<div class="input-group">
												<span class="input-group-addon"> <i class="fa fa-user"></i>
												</span>
												<input class="form-control" name="username" type="text"
													placeholder="登录账户">
											</div>
											<div class="input-group">
												<span class="input-group-addon"> <i class="fa fa-key"></i>
												</span>
												<input type="password" name="password" class="form-control"
													placeholder="登录密码">
											</div>
											<!----
											<div class="input-group">
												<span class="input-group-addon"> <i class="fa fa-qrcode"></i>
												</span>
												<input type="text" name="verify" class="form-control" placeholder="验证码">
												<span class="input-group-addon reloadverify"><img src="{:url('admin/index/verify')}" alt="验证码" height="40" class="verifyimg"></span>
											</div>
											---->
											<div class="row">
												<div class="col-xs-12">
													<button type="submit" class="btn btn-success col-xs-12">
														<span class="hidden">
															<i class="fa-loading"></i>
															登 录 中 ...
														</span>
														<span class="show">登 录</span>
													</button>
												</div>
											</div>
											<div class="row">
												<div class="col-xs-12">
													<div class="btn btn-primary col-xs-12 ">
														<a href="{:url('register')}" class="table-link"><span class="show">注册申请</span></a>
													</div>
												</div>
											</div>
										</form>
									</div>
								</div>
							</div>
						</div>

					</div>
				</div>

			</div>

		</div>
		<div id="login-box-footer">
			<div class="row">
				<div class="col-xs-12">
					Copyright ©2018-2028
					<!-- {$Think.config.web_pc_url|str_replace="http://","",###} All rights reserved--> 
					{:config('web_site_title')}版权所有
				</div>
			</div>
		</div>
	</div>
	<div class="modal fade" id="create-modal">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
							aria-hidden="true">×</span></button>
					<span style="font-size: 20px;"><span id="referralname">添加</span></span>
				</div>
				<div class="modal-body">
					<div data-bind="visible: loading" class="loading-panel" style="display: none;">
						<i class="fa fa-spin fa-spinner"></i>
					</div>
					<form method="post" class="form form-horizontal">
						<div class="form-group">
							<label class="col-lg-2 control-label">姓名</label>
							<div class="col-lg-9 col-sm-9">
								<input type="text" class="form-control" name="username" id="username"
									autocomplete="false" value="">
								<div class="help-block">姓名会作为默认的昵称</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-lg-2 control-label">密码</label>
							<div class="col-lg-9 col-sm-9">
								<input type="password" class="form-control" name="password" id="password"
									autocomplete="false" value="">
								<div class="help-block">用户密码不能少于6位</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-lg-2 control-label">确认密码</label>
							<div class="col-lg-9 col-sm-9">
								<input type="password" class="form-control" name="repassword" id="repassword"
									autocomplete="false" value="">
								<div class="help-block">确认密码</div>
							</div>
						</div>
						<!--
					<div class="form-group">
						<label class="col-lg-2 control-label">邮箱</label>
						<div class="col-lg-9 col-sm-9">
							<input type="text" class="form-control" name="email" id="email" autocomplete="false" value="">
							<div class="help-block">邮箱，用于找回密码等安全操作</div>
						</div>
					</div>
					-->
						<div class="form-group">
							<label class="col-lg-2 control-label">部门</label>
							<div class="col-lg-9 col-sm-9">
								<select class="form-control" name="group" id="group" style="width:100%;">
									<option value="">请选择部门</option>
								</select>
								<div class="help-block">部门</div>
							</div>
						</div>

						<div class="form-group">
							<label class="col-lg-2 control-label">岗位</label>
							<div class="col-lg-9 col-sm-9">
								<select class="form-control" name="situation" id="situation" style="width:100%;">
									<option value="0">请选择岗位</option>
								</select>
								<div class="help-block"></div>
							</div>
						</div>

						<div class="form-group">
							<label class="col-lg-2 control-label">我的上级</label>
							<div class="col-lg-9 col-sm-9">
								<select class="form-control" name="pid" id="pid" style="width:100%;">
									<option value="">请选择上级</option>
								</select>
								<div class="help-block">员工上级</div>
							</div>
						</div>
						<div class="form-group">
							<label class="col-lg-2 control-label">地址</label>
							<div class="col-lg-9 col-sm-9">
								<div data-toggle="distpicker" id="distpicker" style="display: flex;">
									<select class='form-control' data-province="---- 选择省 ----" ></select>
									<select class='form-control' data-city="---- 选择市 ----" ></select>
									<select class='form-control' data-district="---- 选择区 ----" ></select>
								</div>
							</div>
						</div>
					</form>
				</div>
				<div class="modal-footer">
					<button class="btn btn-primary submit-btn ajax-post" url="/a"
					target-form="form-horizontal">提交</button>
				</div>
			</div>
		</div>
	</div>
	<script src="__PUBLIC__/js/jquery.js"></script>
	<script src="__PUBLIC__/js/messager.js"></script>
	<script src="/public/js/bootstrap.js"></script>
	<script src="__PUBLIC__/plugs/distpicker/js/distpicker.data.js"></script>
	<script src="__PUBLIC__/plugs/distpicker/js/distpicker.js"></script>
	<script type="text/javascript">
		$(function () {
			/* 登陆表单获取焦点变色 */
			$(".login-form").on("focus", "input", function () {
				$(this).closest('.item').addClass('focus');
			}).on("blur", "input", function () {
				$(this).closest('.item').removeClass('focus');
			});

			//表单提交
			$(document).ajaxStart(function () {
				$("button:submit").addClass("log-in").attr("disabled", true);
			}).ajaxStop(function () {
				$("button:submit").removeClass("log-in").attr("disabled", false);
			});

			$("form").submit(function () {
				var self = $(this);
				$.post(self.attr("action"), self.serialize(), success, "json");
				return false;

				function success(data) {
					if (data.code) {
						$.messager.show(data.msg, { placement: 'center', type: 'success' });
						setTimeout(function () {
							window.location.href = data.url;
						}, 2000);
					} else {
						$.messager.show(data.msg, { placement: 'center', type: 'success' });
						//刷新验证码
						$(".reloadverify").click();
					}
				}
			});
			//初始化选中用户名输入框
			$("#itemBox").find("input[name=username]").focus();
			//刷新验证码
			var verifyimg = $(".verifyimg").attr("src");
			$(".reloadverify").click(function () {
				if (verifyimg.indexOf('?') > 0) {
					$(".verifyimg").attr("src", verifyimg + '&random=' + Math.random());
				} else {
					$(".verifyimg").attr("src", verifyimg.replace(/\?.*$/, '') + '?' + Math.random());
				}
			});

			//placeholder兼容性
			//如果支持 
			function isPlaceholer() {
				var input = document.createElement('input');
				return "placeholder" in input;
			}
			//如果不支持
			if (!isPlaceholer()) {
				$(".placeholder_copy").css({ display: 'block' })
				$("#itemBox input").keydown(function () {
					$(this).parents(".item").next(".placeholder_copy").css({ display: 'none' })
				})
				$("#itemBox input").blur(function () {
					if ($(this).val() == "") {
						$(this).parents(".item").next(".placeholder_copy").css({ display: 'block' })
					}
				})
			}

			$('.register').on('click',function(){
				var $modal = $('#create-modal');
				$modal.on('shown.bs.modal', function () {
					
				});	
				$modal.modal({backdrop: 'static', keyboard: false});
			});
		});

	</script>
	{include file="public/footer" /}
	<!-- <script src="/public/js/core.js"></script> -->
</body>

</html>